package com.jumper.study.front.dto.resp;

import java.time.LocalDateTime;
import java.time.ZoneOffset;

import com.jumper.study.common.api.OrderStatusCode;

public class OrderItemResp {
    private Long id;

    private String orderNo;

    private Long lessonId;

    private OrderStatusCode status;
    
    private Integer price;

    private String title;

    private String thumb;

    private LocalDateTime createdAt;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getLessonId() {
        return lessonId;
    }

    public void setLessonId(Long lessonId) {
        this.lessonId = lessonId;
    }

    public Integer getStatus() {
        return status.getCode();
    }

    public void setStatus(OrderStatusCode status) {
        this.status = status;
    }

    public Integer getPrice() {
        return price / 100;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getThumb() {
        return thumb;
    }

    public void setThumb(String thumb) {
        this.thumb = thumb;
    }

    public Long getCreatedAt() {
        return createdAt.toEpochSecond(ZoneOffset.UTC);
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
}
